// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import '@/utils/init'
import store from '@/store'
import iView from 'iview'
import '@/styles/iview/index.less'
import '@/styles/global.css'
import Account from './service/account'
import Config from './config'
import Rest from './service/rest'
import BaiduMap from 'vue-baidu-map'
import lodash from 'lodash'

Vue.config.productionTip = false

Vue.use(iView)

Vue.use(BaiduMap, {
  ak: Config.BAIDU_MAP_AK
})

Object.defineProperty(Vue.prototype, '$lodash', { value: lodash })

Rest.setApiUrl(Config.API_URL)

Account.setupRest()

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  template: '<App></App>',
  components: {App}
})
